<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2017/2/11
  Time: 10:59
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" import="java.util.*" pageEncoding="utf-8" %>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
    String path=request.getContextPath();
    String basePath=request.getScheme()+"：//"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<html>
<head>
    <title>注册</title>
</head>
<body>
<script >
    function reset() {
        var text1=document.getElementById("textfield");
        var text2=document.getElementById("textfield2");
        var text3=document.getElementById("textfield3");
        var text4=document.getElementById("textfield4");
        var text5=document.getElementById("textfield5");
        var text6=document.getElementById("textfield6");
        var text11=document.getElementById("textfield11");
        var text14=document.getElementById("textfield14");
        var cwts=document.getElementById("cuowutishi");
        cwts.textContent="";
        text1.textContent="";
        text2.textContent="";
        text3.textContent="";
        text4.textContent="";
        text5.textContent="";
        text6.textContent="";
        text11.textContent="";
        text14.textContent="";
    }
</script>
<script type="text/javascript">
    function shuaxin(obj){
        var shijian=new Date().getTime();
        obj.src="imageAction.action?d="+shijian;
    }
</script>
<div style="text-align: center;">
    <h1>注册页面</h1>
</div>
<s:form action="register" method="post">
    <table width="274" height="292" align="center" border="1">
        <tr>
            <td width="108">姓名：</td>
            <td width="108">
                <input type="text" name="username" id="textfield"/>
            </td>
        </tr>
        <tr>
            <td width="108">账号：</td>
            <td width="108">
                <input type="text" name="userNumber" id="textfield2"/>
            </td>
        </tr>
        <tr>
            <td width="108">密码：</td>
            <td width="108">
                <input type="password" name="password" id="textfield3"/>
            </td>
        </tr>
        <tr>
            <td width="108">重复密码：</td>
            <td width="108">
                <input type="password" name="confirmPassword" id="textfield4"/>
            </td>
        </tr>
        <tr>
            <td width="108">超级密码：</td>
            <td width="108">
                <input type="password" name="superpassword" id="textfield5"/>
            </td>
        </tr>
        <tr>
            <td width="108">重复超级密码：</td>
            <td width="108">
                <input type="password" name="confirmSuperPassword" id="textfield6"/>
            </td>
        </tr>
        <tr>
            <td width="108">性别：</td>
            <td width="108">
                <select name="sex" id="textfield8">
                    <option>男</option>
                    <option>女</option>
                </select>
            </td>
        </tr>
        <tr>
            <td width="108">出生年月：</td>
            <td width="108">
                <select name="year" id="textfield9">
                    <%
                       for(int i=1950;i<=2030;i++){
                    %>
                        <option><%=i%></option>
                    <%
                        };
                    %>
                </select>年
                <select name="month" id="textfield10">
                    <%
                        for(int i=1;i<=12;i++){
                    %>
                    <option><%=i%></option>
                    <%
                        };
                    %>
                </select>月
            </td>
        </tr>
        <tr>
            <td width="108">手机：</td>
            <td width="108">
                <input type="text" name="cellphone" id="textfield11"/>
            </td>
        </tr>
        <tr>
            <td width="108">籍贯：</td>
            <td width="108">
                <%
                    String []addresses={"北京", "天津", "上海", "重庆", "河北", "河南", "云南", "辽宁", "黑龙江", "湖南", "安徽",
                    "山东", "新疆", "江苏", "浙江", "江西", "湖北", "广西", "甘肃", "山西", "内蒙古", "陕西", "吉林", "福建", "贵州",
                    "广东", "青海", "西藏", "四川", "宁夏", "海南", "台湾", "香港", "澳门"};
                %>
                <select name="address" id="textfield12">
                    <%
                        for(int i=0;i<addresses.length;i++){
                    %>
                    <option><%=addresses[i]%></option>
                    <%
                        };
                    %>
                </select>
            </td>
        </tr>
        <tr>
            <td width="108">教育水平：</td>
            <td width="108">
                <select name="education" id="textfield13">
                    <option>未受过教育</option>
                    <option>小学</option>
                    <option>初中</option>
                    <option>高中</option>
                    <option>中专</option>
                    <option>大专</option>
                    <option>本科</option>
                    <option>硕士</option>
                    <option>博士</option>
                </select>
            </td>
        </tr>
        <tr>
            <td>身份证</td>
            <td>
                <input type="text"  name="idCard" id="textfield14"/>
            </td>
        </tr>
        <tr>
            <td>
                验证码：
            </td>
            <td>
                <input type="text"  name="yzm" id="textfield7"/>
                <img src="imageAction" align="left" alt="点击图片" onclick="shuaxin(this)"/>
            </td>
        </tr>
        <tr>
            <td>
                <input type="submit" name="button" id="button" value="提交"/>
            </td>
            <td>
                <input type="reset"  onclick="reset()" value="重置"/>
            </td>
        </tr>
    </table>
</s:form>
<div align="center">
    <font color="red">请将表格填完，否则无法提交！！！</font>
</div>
<div align="center">
    <%
       String rm=(String)request.getAttribute("registermessage");
    %>
    <%
        if(rm!=null&&!rm.trim().equals("")){
    %>
    ${requestScope.registermessage}
    <%
        }
    %>

</div>
</body>
</html>